#pragma once
#include<assert.h>
#include<iostream>
using namespace std;
class Date
{
public:
	Date(int year, int month, int day)
	{
		_year = year;
		_month = month;
		_day = day;
	}
	int getmonday(int year, int month)
	{
		assert(month < 13 && month>0);
		static int arr[13]={ -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
		if (month == 2 &&( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)))
			return 29;
		else
			return arr[month];
	}
	void print();
	bool operator==(const Date& x);
	Date& operator+=(int day);
	Date operator+(int day);
	Date& operator-=(int day);
	Date operator-(int day);
	Date operator=(const Date& x);
	Date& operator++();
	Date operator++(int);
	//int operator-(const Date& d);
	
private:
	int _year;
	int _month;
	int _day;
};
